<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title id="title">郴州农业大数据</title>
		<script src="js/mui.min.js"></script>
		<link href="css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="css/style.css" />
		<link rel="stylesheet" href="css/iconfont.css" />
		<link rel="stylesheet" href="css/index.css" />
		<script src="js/js/jquery.min.js"></script>
		<script src="js/js/jquery.leoweather.min.js"></script>
		
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<h1 class="mui-title" id="top_title">新闻列表</h1>
		</header>
		<div class="mui-content">
			
			<div style="text-align: center; font-size:10px;background:#FFFFFF;">
			</div>
			<div>
				<ul class="mui-table-view ccct">
					<!--	<li class="mui-table-view-cell mui-media">
						<a href="javascript:;">
							<img class="mui-media-object mui-pull-left" src="images/b001.jpg">
							<div class="mui-media-body">
								<span style="float:left;">幸福</span>
								<span style="float:right;">2017-06-21</span>
							</div>
							<p class='mui-ellipsis'>能和心爱的人一起睡觉，是件幸福的事情；可是，打呼噜怎么办？</p>
						</a>
					</li>
					<li class="mui-table-view-cell mui-media">
						<a href="javascript:;">
							<img class="mui-media-object mui-pull-left" src="images/b001.jpg">
							<div class="mui-media-body">
								<span style="float:left;"> 木屋</span>
								<span style="float:right;">2017-06-21</span>
							</div>
							<p class='mui-ellipsis'>想要这样一间小木屋，夏天挫冰吃瓜，冬天围炉取暖.</p>
						</a>
					</li>
					<li class="mui-table-view-cell mui-media">
						<a href="javascript:;">
							<img class="mui-media-object mui-pull-left" src="images/b001.jpg">
							<div class="mui-media-body">
								<span style="float:left;"> CBD</span>
								<span style="float:right;">2017-06-21</span>
							</div>
							<p class='mui-ellipsis'>烤炉模式的城，到黄昏，如同打翻的调色盘一般.</p>
						</a>
					</li>-->
				</ul>
			</div>
		</div>

		<div id="footer"></div>
		<div id="allmap"></div>

	</body>

</html>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script src="js/app.js" type="text/javascript"></script>
<script type="text/javascript" src="js/castapp.js"></script>
<script type="text/javascript" src="js/layer/layer.min.js"></script>
<script type="text/javascript">
	getFoot(getUrlParam("foot_active") > 0 ? getUrlParam("foot_active") : 1);

	$(function() {

		var group_id = '1';
		var member = JSON.parse(localStorage.getItem("member"));
		if(member) {
			if(member['group_id'] == 2) {
				group_id = '2';
			}
		}
		$.ajax({
			//请求的url
			//注意，如果我们使用路由器的情况下，我们需要设置一下本地服务器的ip地址
			url: APP.api_url + 'News/index',
			data: {
				group_id: group_id
			},
			dataType: 'JSONP', // 处理Ajax跨域问题
			//成功了的回调，并且带有返回值
			success: function(data) {
				//layer.msg(data.msg);
				if(data.code == 200) {
					var mem_list = data.list;
					var mem_htm = "";
					for(var i = 0; i < mem_list.length; i++) {
						
							mem_htm += '<div><ul class="mui-table-view">' +
								'<li class="mui-table-view-cell mui-media">' +
								"<a onclick=quer_mem(" + mem_list[i].id + ")>" +
								"<img class='mui-media-object mui-pull-left' src=" + APP.pic_url + mem_list[i].images + ">" +
								'<div class="mui-media-body">' +
								'<span style="float:left;">' + mem_list[i].title + '</span>' +
								'</div>' +
								'<span style="float:left;">' + mem_list[i].name + '</span><span style="float:right;">' + mem_list[i].add_time + '</span></a></li>' +

								'</ul></div>';
						
					}
					$(".ccct").html(mem_htm);
				} else {
					console.log(data.msg);
				}
			}
		});
	});

	function quer_mem(id) {
		var member = JSON.parse(localStorage.getItem("member"));
		if(!member) {
			layer.msg('请登录', { icon: 2, time: 1500, shade: 0.1 });
			window.location.href = "login.html";
		} else {
			window.location.href = "xq.html?id=" + id;
		}

	}

	function tiao(k) {
		window.location.href = "shop/shoplist.html?k=" + k;
	}
</script>